<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//Route::get('/', function () {
//    return view('welcome');
//});


Route::group(['prefix' => '', 'as' => 'index.', 'namespace' => 'Index'], function () {
    Route::get('/', 'IndexController@index')->name('index');
    Route::get('/show/{id}', 'IndexController@show');
});

Auth::routes();

Route::group(['prefix' => 'home','middleware' => 'auth', 'as' => 'home.', 'namespace' => 'Home'], function () {
    Route::get('', 'HomeController@index');
    Route::get('/index', 'HomeController@index');
    Route::any('/create/{good?}', 'HomeController@create');
    Route::get('/type', 'HomeController@type');
    Route::any('/ctype/{type?}', 'HomeController@ctype');
    Route::get('/delete/{id}', 'HomeController@delete');
    Route::any('/setting', 'HomeController@setting');
});



